{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "os.chdir('./SkipGNN')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Loading DTI dataset...\n",
      "/home/kh278/SkipGNN/SkipGNN/utils.py:319: RuntimeWarning: divide by zero encountered in power\n",
      "  d_inv_sqrt = np.power(rowsum, -0.5).flatten()\n",
      "Start Training...\n",
      "-------- Epoch 1 --------\n",
      "epoch: 1/ iteration: 1/ loss_train: 0.69704634\n",
      "epoch: 0001 loss_train: 0.3230 auroc_train: 0.8902 loss_val: 0.4384 auroc_val: 0.8768 auprc_val: 0.9046 f1_val: 0.7678 time: 15.0479s\n",
      "-------- Epoch 2 --------\n",
      "epoch: 2/ iteration: 1/ loss_train: 0.32939032\n",
      "epoch: 0002 loss_train: 0.2301 auroc_train: 0.9516 loss_val: 0.4378 auroc_val: 0.9050 auprc_val: 0.9220 f1_val: 0.8029 time: 14.7889s\n",
      "-------- Epoch 3 --------\n",
      "epoch: 3/ iteration: 1/ loss_train: 0.26908302\n",
      "epoch: 0003 loss_train: 0.2051 auroc_train: 0.9648 loss_val: 0.3093 auroc_val: 0.9272 auprc_val: 0.9384 f1_val: 0.8236 time: 14.7936s\n",
      "-------- Epoch 4 --------\n",
      "epoch: 4/ iteration: 1/ loss_train: 0.17913999\n",
      "epoch: 0004 loss_train: 0.1685 auroc_train: 0.9747 loss_val: 0.3319 auroc_val: 0.9375 auprc_val: 0.9449 f1_val: 0.8440 time: 14.8388s\n",
      "-------- Epoch 5 --------\n",
      "epoch: 5/ iteration: 1/ loss_train: 0.24309282\n",
      "epoch: 0005 loss_train: 0.1638 auroc_train: 0.9798 loss_val: 0.3561 auroc_val: 0.9411 auprc_val: 0.9468 f1_val: 0.8576 time: 14.9376s\n",
      "-------- Epoch 6 --------\n",
      "epoch: 6/ iteration: 1/ loss_train: 0.13963906\n",
      "epoch: 0006 loss_train: 0.2071 auroc_train: 0.9828 loss_val: 0.4044 auroc_val: 0.9474 auprc_val: 0.9502 f1_val: 0.8428 time: 14.8771s\n",
      "-------- Epoch 7 --------\n",
      "epoch: 7/ iteration: 1/ loss_train: 0.15134923\n",
      "epoch: 0007 loss_train: 0.1530 auroc_train: 0.9852 loss_val: 0.2611 auroc_val: 0.9501 auprc_val: 0.9522 f1_val: 0.8585 time: 15.9884s\n",
      "-------- Epoch 8 --------\n",
      "epoch: 8/ iteration: 1/ loss_train: 0.15354642\n",
      "epoch: 0008 loss_train: 0.1861 auroc_train: 0.9870 loss_val: 0.2308 auroc_val: 0.9513 auprc_val: 0.9527 f1_val: 0.8708 time: 15.1531s\n",
      "-------- Epoch 9 --------\n",
      "epoch: 9/ iteration: 1/ loss_train: 0.15526314\n",
      "epoch: 0009 loss_train: 0.1573 auroc_train: 0.9882 loss_val: 0.3543 auroc_val: 0.9478 auprc_val: 0.9469 f1_val: 0.8397 time: 16.2925s\n",
      "-------- Epoch 10 --------\n",
      "epoch: 10/ iteration: 1/ loss_train: 0.0890046\n",
      "epoch: 0010 loss_train: 0.1818 auroc_train: 0.9888 loss_val: 0.2541 auroc_val: 0.9542 auprc_val: 0.9557 f1_val: 0.8794 time: 17.4863s\n",
      "-------- Epoch 11 --------\n",
      "epoch: 11/ iteration: 1/ loss_train: 0.13553382\n",
      "epoch: 0011 loss_train: 0.1824 auroc_train: 0.9896 loss_val: 0.3717 auroc_val: 0.9479 auprc_val: 0.9437 f1_val: 0.8658 time: 17.4258s\n",
      "-------- Epoch 12 --------\n",
      "epoch: 12/ iteration: 1/ loss_train: 0.08793793\n",
      "epoch: 0012 loss_train: 0.1537 auroc_train: 0.9903 loss_val: 0.3435 auroc_val: 0.9504 auprc_val: 0.9486 f1_val: 0.8450 time: 17.4423s\n",
      "-------- Epoch 13 --------\n",
      "epoch: 13/ iteration: 1/ loss_train: 0.08418721\n",
      "epoch: 0013 loss_train: 0.1092 auroc_train: 0.9910 loss_val: 0.4906 auroc_val: 0.9501 auprc_val: 0.9481 f1_val: 0.8704 time: 17.4063s\n",
      "-------- Epoch 14 --------\n",
      "epoch: 14/ iteration: 1/ loss_train: 0.10371494\n",
      "epoch: 0014 loss_train: 0.0745 auroc_train: 0.9915 loss_val: 0.3846 auroc_val: 0.9499 auprc_val: 0.9482 f1_val: 0.8753 time: 17.5069s\n",
      "-------- Epoch 15 --------\n",
      "epoch: 15/ iteration: 1/ loss_train: 0.08469194\n",
      "epoch: 0015 loss_train: 0.1427 auroc_train: 0.9918 loss_val: 0.4074 auroc_val: 0.9520 auprc_val: 0.9515 f1_val: 0.8801 time: 17.6926s\n",
      "Optimization Finished!\n",
      "Total time elapsed: 241.8090s\n",
      "loss_test: 0.3867 auroc_test: 0.9515 auprc_test: 0.9516 f1_test: 0.8787\n"
     ]
    }
   ],
   "source": [
    "!python train.py \\\n",
    "    --epochs 15 \\\n",
    "    --lr 5e-4 \\\n",
    "    --batch_size 256 \\\n",
    "    --hidden1 64 \\\n",
    "    --hidden2 16 \\\n",
    "    --hidden_decode1 512 \\\n",
    "    --network_type DTI \\\n",
    "    --data_path '../data/DTI/fold1' \\\n",
    "    --input_type one_hot     "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Loading DDI dataset...\n",
      "/home/kh278/SkipGNN/SkipGNN/utils.py:319: RuntimeWarning: divide by zero encountered in power\n",
      "  d_inv_sqrt = np.power(rowsum, -0.5).flatten()\n",
      "Start Training...\n",
      "-------- Epoch 1 --------\n",
      "epoch: 1/ iteration: 1/ loss_train: 0.6938914\n",
      "epoch: 1/ iteration: 101/ loss_train: 0.45968282\n",
      "epoch: 1/ iteration: 201/ loss_train: 0.36807123\n",
      "epoch: 0001 loss_train: 0.4474 auroc_train: 0.8570 loss_val: 0.4798 auroc_val: 0.8835 auprc_val: 0.8629 f1_val: 0.7154 time: 55.1310s\n",
      "-------- Epoch 2 --------\n",
      "epoch: 2/ iteration: 1/ loss_train: 0.44118068\n",
      "epoch: 2/ iteration: 101/ loss_train: 0.45071983\n",
      "epoch: 2/ iteration: 201/ loss_train: 0.4129274\n",
      "epoch: 0002 loss_train: 0.3773 auroc_train: 0.8801 loss_val: 0.3991 auroc_val: 0.8837 auprc_val: 0.8619 f1_val: 0.7631 time: 55.0648s\n",
      "-------- Epoch 3 --------\n",
      "epoch: 3/ iteration: 1/ loss_train: 0.38741544\n",
      "epoch: 3/ iteration: 101/ loss_train: 0.44311997\n",
      "epoch: 3/ iteration: 201/ loss_train: 0.5123078\n",
      "epoch: 0003 loss_train: 0.4453 auroc_train: 0.8805 loss_val: 0.4253 auroc_val: 0.8833 auprc_val: 0.8617 f1_val: 0.8076 time: 55.0374s\n",
      "-------- Epoch 4 --------\n",
      "epoch: 4/ iteration: 1/ loss_train: 0.41270593\n",
      "epoch: 4/ iteration: 101/ loss_train: 0.3967005\n",
      "epoch: 4/ iteration: 201/ loss_train: 0.5191857\n",
      "epoch: 0004 loss_train: 0.4388 auroc_train: 0.8816 loss_val: 0.4352 auroc_val: 0.8845 auprc_val: 0.8621 f1_val: 0.7804 time: 55.1052s\n",
      "-------- Epoch 5 --------\n",
      "epoch: 5/ iteration: 1/ loss_train: 0.42494228\n",
      "epoch: 5/ iteration: 101/ loss_train: 0.422868\n",
      "epoch: 5/ iteration: 201/ loss_train: 0.45960298\n",
      "epoch: 0005 loss_train: 0.4306 auroc_train: 0.8816 loss_val: 0.4979 auroc_val: 0.8839 auprc_val: 0.8628 f1_val: 0.7591 time: 51.1817s\n",
      "-------- Epoch 6 --------\n",
      "epoch: 6/ iteration: 1/ loss_train: 0.4113693\n",
      "epoch: 6/ iteration: 101/ loss_train: 0.42194772\n",
      "epoch: 6/ iteration: 201/ loss_train: 0.40263236\n",
      "epoch: 0006 loss_train: 0.4884 auroc_train: 0.8814 loss_val: 0.3634 auroc_val: 0.8831 auprc_val: 0.8613 f1_val: 0.7918 time: 47.8296s\n",
      "-------- Epoch 7 --------\n",
      "epoch: 7/ iteration: 1/ loss_train: 0.3946837\n",
      "epoch: 7/ iteration: 101/ loss_train: 0.4275338\n",
      "epoch: 7/ iteration: 201/ loss_train: 0.4490307\n",
      "epoch: 0007 loss_train: 0.4105 auroc_train: 0.8823 loss_val: 0.4713 auroc_val: 0.8843 auprc_val: 0.8619 f1_val: 0.7644 time: 49.9067s\n",
      "-------- Epoch 8 --------\n",
      "epoch: 8/ iteration: 1/ loss_train: 0.49429548\n",
      "epoch: 8/ iteration: 101/ loss_train: 0.41142234\n",
      "epoch: 8/ iteration: 201/ loss_train: 0.4109785\n",
      "epoch: 0008 loss_train: 0.3636 auroc_train: 0.8819 loss_val: 0.3934 auroc_val: 0.8835 auprc_val: 0.8617 f1_val: 0.7999 time: 48.9493s\n",
      "-------- Epoch 9 --------\n",
      "epoch: 9/ iteration: 1/ loss_train: 0.41234744\n",
      "epoch: 9/ iteration: 101/ loss_train: 0.46136618\n",
      "epoch: 9/ iteration: 201/ loss_train: 0.43437994\n",
      "epoch: 0009 loss_train: 0.3585 auroc_train: 0.8831 loss_val: 0.4422 auroc_val: 0.8840 auprc_val: 0.8613 f1_val: 0.7952 time: 47.2580s\n",
      "-------- Epoch 10 --------\n",
      "epoch: 10/ iteration: 1/ loss_train: 0.46830875\n",
      "epoch: 10/ iteration: 101/ loss_train: 0.45532972\n",
      "epoch: 10/ iteration: 201/ loss_train: 0.4514406\n",
      "epoch: 0010 loss_train: 0.3945 auroc_train: 0.8829 loss_val: 0.4787 auroc_val: 0.8852 auprc_val: 0.8622 f1_val: 0.7395 time: 47.2943s\n",
      "-------- Epoch 11 --------\n",
      "epoch: 11/ iteration: 1/ loss_train: 0.4386609\n",
      "epoch: 11/ iteration: 101/ loss_train: 0.3881397\n",
      "epoch: 11/ iteration: 201/ loss_train: 0.39655608\n",
      "epoch: 0011 loss_train: 0.3791 auroc_train: 0.8829 loss_val: 0.3899 auroc_val: 0.8842 auprc_val: 0.8611 f1_val: 0.7771 time: 47.3022s\n",
      "-------- Epoch 12 --------\n",
      "epoch: 12/ iteration: 1/ loss_train: 0.3797938\n",
      "epoch: 12/ iteration: 101/ loss_train: 0.43569186\n",
      "epoch: 12/ iteration: 201/ loss_train: 0.43562984\n",
      "epoch: 0012 loss_train: 0.4334 auroc_train: 0.8828 loss_val: 0.4362 auroc_val: 0.8844 auprc_val: 0.8610 f1_val: 0.7460 time: 47.2707s\n",
      "-------- Epoch 13 --------\n",
      "epoch: 13/ iteration: 1/ loss_train: 0.40903187\n",
      "epoch: 13/ iteration: 101/ loss_train: 0.4465523\n",
      "epoch: 13/ iteration: 201/ loss_train: 0.49486366\n",
      "epoch: 0013 loss_train: 0.4344 auroc_train: 0.8831 loss_val: 0.4355 auroc_val: 0.8840 auprc_val: 0.8609 f1_val: 0.7870 time: 47.2167s\n",
      "-------- Epoch 14 --------\n",
      "epoch: 14/ iteration: 1/ loss_train: 0.45088375\n",
      "epoch: 14/ iteration: 101/ loss_train: 0.42002648\n",
      "epoch: 14/ iteration: 201/ loss_train: 0.39232823\n",
      "epoch: 0014 loss_train: 0.4636 auroc_train: 0.8829 loss_val: 0.4236 auroc_val: 0.8852 auprc_val: 0.8622 f1_val: 0.7809 time: 47.2635s\n",
      "-------- Epoch 15 --------\n",
      "epoch: 15/ iteration: 1/ loss_train: 0.37118977\n",
      "epoch: 15/ iteration: 101/ loss_train: 0.49957836\n",
      "epoch: 15/ iteration: 201/ loss_train: 0.38701886\n",
      "epoch: 0015 loss_train: 0.4404 auroc_train: 0.8843 loss_val: 0.3754 auroc_val: 0.8865 auprc_val: 0.8637 f1_val: 0.7956 time: 47.4558s\n",
      "Optimization Finished!\n",
      "Total time elapsed: 749.3626s\n",
      "loss_test: 0.3963 auroc_test: 0.8820 auprc_test: 0.8607 f1_test: 0.7919\n"
     ]
    }
   ],
   "source": [
    "!python train.py \\\n",
    "    --epochs 15 \\\n",
    "    --lr 5e-4 \\\n",
    "    --batch_size 256 \\\n",
    "    --hidden1 64 \\\n",
    "    --hidden2 16 \\\n",
    "    --hidden_decode1 512 \\\n",
    "    --network_type DDI \\\n",
    "    --data_path '../data/DDI/fold1'\\\n",
    "    --input_type one_hot     "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Loading PPI dataset...\n",
      "/home/kh278/SkipGNN/SkipGNN/utils.py:319: RuntimeWarning: divide by zero encountered in power\n",
      "  d_inv_sqrt = np.power(rowsum, -0.5).flatten()\n",
      "Start Training...\n",
      "-------- Epoch 1 --------\n",
      "epoch: 1/ iteration: 1/ loss_train: 0.7014672\n",
      "epoch: 1/ iteration: 101/ loss_train: 0.3249293\n",
      "epoch: 0001 loss_train: 0.2823 auroc_train: 0.8957 loss_val: 0.3771 auroc_val: 0.9056 auprc_val: 0.9151 f1_val: 0.8115 time: 21.0133s\n",
      "-------- Epoch 2 --------\n",
      "epoch: 2/ iteration: 1/ loss_train: 0.3921102\n",
      "epoch: 2/ iteration: 101/ loss_train: 0.29471502\n",
      "epoch: 0002 loss_train: 0.3398 auroc_train: 0.9356 loss_val: 0.3479 auroc_val: 0.9096 auprc_val: 0.9176 f1_val: 0.8195 time: 20.6942s\n",
      "-------- Epoch 3 --------\n",
      "epoch: 3/ iteration: 1/ loss_train: 0.33236504\n",
      "epoch: 3/ iteration: 101/ loss_train: 0.32633227\n",
      "epoch: 0003 loss_train: 0.3483 auroc_train: 0.9382 loss_val: 0.3962 auroc_val: 0.9096 auprc_val: 0.9189 f1_val: 0.8230 time: 20.8324s\n",
      "-------- Epoch 4 --------\n",
      "epoch: 4/ iteration: 1/ loss_train: 0.32002503\n",
      "epoch: 4/ iteration: 101/ loss_train: 0.31282595\n",
      "epoch: 0004 loss_train: 0.3299 auroc_train: 0.9406 loss_val: 0.4284 auroc_val: 0.9081 auprc_val: 0.9181 f1_val: 0.8271 time: 20.5795s\n",
      "-------- Epoch 5 --------\n",
      "epoch: 5/ iteration: 1/ loss_train: 0.31727314\n",
      "epoch: 5/ iteration: 101/ loss_train: 0.39412183\n",
      "epoch: 0005 loss_train: 0.2811 auroc_train: 0.9428 loss_val: 0.3522 auroc_val: 0.9073 auprc_val: 0.9163 f1_val: 0.8117 time: 20.6320s\n",
      "-------- Epoch 6 --------\n",
      "epoch: 6/ iteration: 1/ loss_train: 0.30385813\n",
      "epoch: 6/ iteration: 101/ loss_train: 0.33350933\n",
      "epoch: 0006 loss_train: 0.2641 auroc_train: 0.9439 loss_val: 0.3911 auroc_val: 0.9085 auprc_val: 0.9172 f1_val: 0.8431 time: 20.6461s\n",
      "-------- Epoch 7 --------\n",
      "epoch: 7/ iteration: 1/ loss_train: 0.3212624\n",
      "epoch: 7/ iteration: 101/ loss_train: 0.25434607\n",
      "epoch: 0007 loss_train: 0.2868 auroc_train: 0.9447 loss_val: 0.3972 auroc_val: 0.9076 auprc_val: 0.9169 f1_val: 0.8215 time: 20.6023s\n",
      "-------- Epoch 8 --------\n",
      "epoch: 8/ iteration: 1/ loss_train: 0.28307414\n",
      "epoch: 8/ iteration: 101/ loss_train: 0.31801602\n",
      "epoch: 0008 loss_train: 0.3668 auroc_train: 0.9455 loss_val: 0.3652 auroc_val: 0.9063 auprc_val: 0.9157 f1_val: 0.8231 time: 20.7443s\n",
      "-------- Epoch 9 --------\n",
      "epoch: 9/ iteration: 1/ loss_train: 0.2894022\n",
      "epoch: 9/ iteration: 101/ loss_train: 0.31637067\n",
      "epoch: 0009 loss_train: 0.3238 auroc_train: 0.9465 loss_val: 0.4753 auroc_val: 0.9056 auprc_val: 0.9146 f1_val: 0.8320 time: 20.5812s\n",
      "-------- Epoch 10 --------\n",
      "epoch: 10/ iteration: 1/ loss_train: 0.26557428\n",
      "epoch: 10/ iteration: 101/ loss_train: 0.3205306\n",
      "epoch: 0010 loss_train: 0.3368 auroc_train: 0.9469 loss_val: 0.4754 auroc_val: 0.9052 auprc_val: 0.9145 f1_val: 0.8215 time: 20.6554s\n",
      "-------- Epoch 11 --------\n",
      "epoch: 11/ iteration: 1/ loss_train: 0.29735532\n",
      "epoch: 11/ iteration: 101/ loss_train: 0.28486446\n",
      "epoch: 0011 loss_train: 0.2447 auroc_train: 0.9478 loss_val: 0.4371 auroc_val: 0.9062 auprc_val: 0.9147 f1_val: 0.8419 time: 20.6320s\n",
      "-------- Epoch 12 --------\n",
      "epoch: 12/ iteration: 1/ loss_train: 0.33296862\n",
      "epoch: 12/ iteration: 101/ loss_train: 0.28154367\n",
      "epoch: 0012 loss_train: 0.2502 auroc_train: 0.9482 loss_val: 0.3867 auroc_val: 0.9026 auprc_val: 0.9135 f1_val: 0.8275 time: 20.5849s\n",
      "-------- Epoch 13 --------\n",
      "epoch: 13/ iteration: 1/ loss_train: 0.26683226\n",
      "epoch: 13/ iteration: 101/ loss_train: 0.33456656\n",
      "epoch: 0013 loss_train: 0.2583 auroc_train: 0.9486 loss_val: 0.4076 auroc_val: 0.9032 auprc_val: 0.9126 f1_val: 0.8262 time: 20.7507s\n",
      "-------- Epoch 14 --------\n",
      "epoch: 14/ iteration: 1/ loss_train: 0.2704221\n",
      "epoch: 14/ iteration: 101/ loss_train: 0.25346515\n",
      "epoch: 0014 loss_train: 0.3431 auroc_train: 0.9495 loss_val: 0.3631 auroc_val: 0.9014 auprc_val: 0.9117 f1_val: 0.7853 time: 20.6004s\n",
      "-------- Epoch 15 --------\n",
      "epoch: 15/ iteration: 1/ loss_train: 0.2846045\n",
      "epoch: 15/ iteration: 101/ loss_train: 0.30344868\n",
      "epoch: 0015 loss_train: 0.3738 auroc_train: 0.9488 loss_val: 0.4800 auroc_val: 0.9000 auprc_val: 0.9109 f1_val: 0.7903 time: 20.6026s\n",
      "Optimization Finished!\n",
      "Total time elapsed: 310.2010s\n",
      "loss_test: 0.3957 auroc_test: 0.9127 auprc_test: 0.9184 f1_test: 0.8169\n"
     ]
    }
   ],
   "source": [
    "!python train.py \\\n",
    "    --epochs 15 \\\n",
    "    --lr 5e-4 \\\n",
    "    --batch_size 256 \\\n",
    "    --hidden1 64 \\\n",
    "    --hidden2 16 \\\n",
    "    --hidden_decode1 512 \\\n",
    "    --network_type PPI \\\n",
    "    --data_path '../data/PPI/fold1' \\\n",
    "    --input_type one_hot     "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Loading GDI dataset...\n",
      "/home/kh278/SkipGNN/SkipGNN/utils.py:267: SettingWithCopyWarning: \n",
      "A value is trying to be set on a copy of a slice from a DataFrame.\n",
      "Try using .loc[row_indexer,col_indexer] = value instead\n",
      "\n",
      "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
      "  df_data_t['Gene_ID'] = df_data_t['Gene_ID'].apply(str)\n",
      "/home/kh278/SkipGNN/SkipGNN/utils.py:319: RuntimeWarning: divide by zero encountered in power\n",
      "  d_inv_sqrt = np.power(rowsum, -0.5).flatten()\n",
      "Start Training...\n",
      "-------- Epoch 1 --------\n",
      "epoch: 1/ iteration: 1/ loss_train: 0.70316505\n",
      "epoch: 1/ iteration: 101/ loss_train: 0.3742792\n",
      "epoch: 1/ iteration: 201/ loss_train: 0.27375957\n",
      "epoch: 1/ iteration: 301/ loss_train: 0.34039626\n",
      "epoch: 1/ iteration: 401/ loss_train: 0.36469382\n",
      "epoch: 0001 loss_train: 0.3150 auroc_train: 0.9319 loss_val: 0.3522 auroc_val: 0.9120 auprc_val: 0.9243 f1_val: 0.8282 time: 181.0841s\n",
      "-------- Epoch 2 --------\n",
      "epoch: 2/ iteration: 1/ loss_train: 0.2986713\n",
      "epoch: 2/ iteration: 101/ loss_train: 0.32438007\n",
      "epoch: 2/ iteration: 201/ loss_train: 0.31910628\n",
      "epoch: 2/ iteration: 301/ loss_train: 0.33359006\n",
      "epoch: 2/ iteration: 401/ loss_train: 0.33119613\n",
      "epoch: 0002 loss_train: 0.2565 auroc_train: 0.9444 loss_val: 0.4018 auroc_val: 0.9119 auprc_val: 0.9240 f1_val: 0.8365 time: 180.7489s\n",
      "-------- Epoch 3 --------\n",
      "epoch: 3/ iteration: 1/ loss_train: 0.27795583\n",
      "epoch: 3/ iteration: 101/ loss_train: 0.27985674\n",
      "epoch: 3/ iteration: 201/ loss_train: 0.27210858\n",
      "epoch: 3/ iteration: 301/ loss_train: 0.3634051\n",
      "epoch: 3/ iteration: 401/ loss_train: 0.29199046\n",
      "epoch: 0003 loss_train: 0.2630 auroc_train: 0.9453 loss_val: 0.3185 auroc_val: 0.9131 auprc_val: 0.9245 f1_val: 0.8409 time: 180.4828s\n",
      "-------- Epoch 4 --------\n",
      "epoch: 4/ iteration: 1/ loss_train: 0.26000497\n",
      "epoch: 4/ iteration: 101/ loss_train: 0.27018726\n",
      "epoch: 4/ iteration: 201/ loss_train: 0.29168668\n",
      "epoch: 4/ iteration: 301/ loss_train: 0.2896079\n",
      "epoch: 4/ iteration: 401/ loss_train: 0.2908656\n",
      "epoch: 0004 loss_train: 0.3069 auroc_train: 0.9462 loss_val: 0.4445 auroc_val: 0.9127 auprc_val: 0.9239 f1_val: 0.8374 time: 180.2605s\n",
      "-------- Epoch 5 --------\n",
      "epoch: 5/ iteration: 1/ loss_train: 0.25457698\n",
      "epoch: 5/ iteration: 101/ loss_train: 0.29562843\n",
      "epoch: 5/ iteration: 201/ loss_train: 0.3185506\n",
      "epoch: 5/ iteration: 301/ loss_train: 0.3059499\n",
      "epoch: 5/ iteration: 401/ loss_train: 0.24085552\n",
      "epoch: 0005 loss_train: 0.3631 auroc_train: 0.9469 loss_val: 0.3765 auroc_val: 0.9143 auprc_val: 0.9243 f1_val: 0.8221 time: 180.9645s\n",
      "Optimization Finished!\n",
      "Total time elapsed: 903.5966s\n",
      "loss_test: 0.4395 auroc_test: 0.9162 auprc_test: 0.9275 f1_test: 0.8182\n"
     ]
    }
   ],
   "source": [
    "!python train.py \\\n",
    "    --epochs 5 \\\n",
    "    --lr 5e-4 \\\n",
    "    --batch_size 256 \\\n",
    "    --hidden1 64 \\\n",
    "    --hidden2 16 \\\n",
    "    --hidden_decode1 512 \\\n",
    "    --network_type GDI \\\n",
    "    --data_path '../data/GDI/fold1'\\\n",
    "    --input_type one_hot     "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
